<?php defined('BASEPATH') or exit('No direct script access allowed');
class Plugin_News extends Plugin
{
	public function news_image(){
		$result = base_url('uploads/no_img.png');
		$file      = $this->attribute('file');
		//echo $file;exit;
		$fol = "";
		if($this->attribute('thumbs'))
		{
			if($this->attribute('thumbs')==1)
				$fol = "thumbs/";
		}
		$thumbs      = $fol;//$this->attribute('thumbs') ? 'thumbs/' : '';
		$image = 'uploads/news/'.$thumbs.$file;
		if(is_file('uploads/news/'.$thumbs.$file))
			$result = base_url('uploads/news/'.$thumbs.$file);
		//return $file;
		return $result;//base_url('uploads/shop/p/'.$thumbs.$file);
	}
}
